import request from '../../../utils/request'

export function pkDetailPaginationListApi (page_size, current_page) {
  /**
   * 通过分页数据获取竞赛详情信息列表接口
  */
  return request({
    url: '/api/games/pk-detail/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}

export function pkDetailSearchPaginationListApi (page_size, current_page, search_data) {
  /**
   * 通过分页数据查询竞赛详情信息列表接口
  */
  return request({
    url: '/api/games/pk-detail/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_data,
    method: 'GET',
  })
}

export function pkDetailListApi () {
  /**
   * 竞赛详情信息列表接口
  */
  return request({
    url: '/api/games/pk-detail/',
    method: 'GET'
  })
}

export function pkDetailCreateApi (data) {
  /**
   * 竞赛详情信息注册接口
  */
  return request({
    url: '/api/games/pk-detail/',
    method: 'POST',
    data: data
  })
}

export function pkDetailDeleteApi (data) {
  /**
   * 竞赛详情信息删除接口
  */
  return request({
    url: '/api/games/pk-detail/' + data['id'] + '/',
    method: 'DELETE',
  })
}

export function pkDetailUpdateApi (data) {
  /**
   * 竞赛详情信息更新接口
  */
  return request({
    url: '/api/games/pk-detail/' + data['id'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function pkDetailDetailApi (data) {
  /**
   * 竞赛详情信息详细接口——单个竞赛详情信息
  */
  return request({
    url: '/api/games/pk-detail/' + data['id'] + '/',
    method: 'GET',
  })
}
